import request from '@/utils/request'

//列表
export const indexApi = async (params) => {
    return await request.get({ 
        url: '/api/users/index',
        params
    })
}

//新增
export const addApi = async (data) => {
    return await request.post({ 
        url: '/api/users/add',
        data
    })
}

//编辑
export const editApi = async (data) => {
    return await request.post({ 
        url: '/api/users/edit',
        data
    })
}

//导入
export const importApi = async (data) => {
    return await request.post({ 
        url: '/api/users/import',
        data
    })
}

//删除
export const delApi = async (data) => {
    return await request.post({ 
        url: '/api/users/del',
        data
    })
}

//更新
export const updateFieldApi = async (data) => {
    return await request.post({ 
        url: '/api/users/?update=field',
        data
    })
}